package com.deep.spring.v5;

import org.springframework.validation.annotation.Validated;
import org.springframework.web.bind.annotation.*;

@Validated
@RestController
public class ViewCon {

    @RequestMapping(value = "/testRequestBody", method = RequestMethod.GET, produces = "text/plain;charset=UTF-8")
    @ResponseBody
    public Object testMap(@Validated InputBody input) {
        System.out.println(input.getDate() + "   " + input.getDate());

        return input;
    }

    @GetMapping(value = "/testChar", produces = "text/plain;charset=UTF-8")
    @ResponseBody()
    public Object testesttMap() {
        return "啊大事发声";
    }
}
